return {
  {
    --[[
  :%s/<from>/<to>             :%s/he/his
  :%s/<from>/<to>/g           :%s/he/his/g
  :<range>s/<from>/<to>       :2,5s/he/his
  :<range>s/<from>/<to>/g     :2,5s/he/his/g
  ]]
    -- https://gitcode.com/gh_mirrors/gr/grug-far.nvim/?utm_source=artical_gitcode&index=bottom&type=card&
    -- 注意: 请确保已配置 <localleader>
    -- 全局查找替换
    "MagicDuck/grug-far.nvim",
    enabled = true,
    config = function()
      require("grug-far").setup {}

      -- 在当前文件中限制搜索/替换操作
      vim.keymap.set({ "n", "x" }, "<leader>sf", function()
        require("grug-far").open { prefills = { paths = vim.fn.expand "%" } }
      end, { desc = "grug-far: Search within current buffer file" })

      vim.keymap.set({ "n", "x" }, "<leader>si", function()
        require("grug-far").open { visualSelectionUsage = "operate-within-range" }
      end, { desc = "grug-far: Search within range" })
    end,
  },
  {
    -- 增强替换功能插件
    "gbprod/substitute.nvim",
    event = { "BufReadPre", "BufNewFile" },
    config = function()
      local substitute = require "substitute"
      substitute.setup()

      vim.keymap.set("n", "s", substitute.operator, { desc = "Substitute with motion" })
      vim.keymap.set("n", "ss", substitute.line, { desc = "Substitute line" })
      vim.keymap.set("n", "S", substitute.eol, { desc = "Substitute to end of line" })
      vim.keymap.set("x", "s", substitute.visual, { desc = "Substitute in visual mode" })
    end,
  },
}
